<!-- 浏览记录 -->
<template>
	<view class="page_box">
		<view class="head_box x-bc" v-if="browseList && browseList.length">
			<view class="count-box"></view>
			<button class="cu-btn set-btn" @tap="onSet">{{ isSel ? '完成' : '编辑' }}</button>
		</view>
		<view class="content_box">
			<scroll-view scroll-y="true" @scrolltolower="loadMore" class="scroll-box padding">
				
				<view class="info flex solid-bottom padding-tb-xs bg-white radius margin-bottom-xs"  v-for="(item,index) in data" :key="index">
					<view class=" flex justify-center align-center text-cut" style="width: 100rpx;">
						<text class="cu-tag round bg-gray">{{index+1}}</text>
					</view>
					<view class="flex-sub flex justify-center align-center">
						<image :src="item.avatar" mode="" style="width: 90rpx; height: 90rpx;" class=" round "></image>
					</view>
					<view class="flex-sub flex justify-center align-center ">
						<text>{{item.mobile}}</text>
					</view>
					<view class="flex-sub flex justify-center align-center text-cut">
						<text>{{item.nickname}}</text>
					</view>
				</view>

				<!-- 缺省页 -->
				<shopro-empty v-if="!data.length" :emptyData="emptyData"></shopro-empty>
				<!-- 更多 -->
				<u-loadmore v-if="browseList.length" height="80rpx" :status="loadStatus" icon-type="flower" color="#ccc" />
			</scroll-view>
		</view>

		<!-- 自定义底部导航 -->
		<shopro-tabbar></shopro-tabbar>
		<!-- 关注弹窗 -->
		<shopro-float-btn></shopro-float-btn>
		<!-- 连续弹窗提醒 -->
		<shopro-notice-modal></shopro-notice-modal>
		<!-- 登录提示 -->
		<shopro-login-modal></shopro-login-modal>
	</view>
</template>

<script>
export default {
	components: {},
	data() {
		return {
			data:[],
			isSel: false,
			allSel: false,
			routerTo: this.$Router,
			selList: [],
			emptyData: {
				img: 'http://shopro.7wpp.com'+ '/imgs/empty/empty_goods.png',
				tip: '暂无团队',
				path: '/pages/index/index',
				pathText: '去首页逛逛',
			},
			browseList: [],
			loadStatus: 'loadmore', //loadmore-加载前的状态，loading-加载中的状态，nomore-没有更多的状态
			currentPage: 1,
			lastPage: 1,
		};
	},
	onLoad() {
		this.getbrowseList();
	},
	methods: {
		// 历史记录
		getbrowseList() {
			let that = this;
			that.loadStatus = 'loading';
			that.$api('myTeam', {
				page: that.currentPage,
			}).then(res => {
				console.log('res :>> ', res);
				this.data = res.data.data
				
			});
		},

		// 加载更多
		loadMore() {
			if (this.currentPage < this.lastPage) {
				this.currentPage += 1;
				this.getbrowseList();
			}
		},
	},
};
</script>

<style lang="scss">
.content_box {
	.info {
		
	}
}
.head_box {
	height: 70rpx;
	padding: 0 30rpx;

	.count-box {
		font-size: 26rpx;
		color: #999;

		.all-num {
			color: #a8700d;
		}
	}

	.set-btn {
		background: none;
		font-size: 26rpx;
		color: #a8700d;
	}
}

.collect-list {
	padding: 30rpx 20rpx;
	background: #fff;
	margin-bottom: 20rpx;

	.goods-radio {
		transform: scale(0.7);
		margin-right: 20rpx;
	}
}

.tools-box {
	height: 100rpx;
	width: 750rpx;
	padding: 0 20rpx;
	background: #fff;

	.check-all {
		font-size: 26rpx;

		.check-all-radio {
			transform: scale(0.7);
		}
	}

	.close-btn {
		width: 200rpx;
		height: 70rpx;
		background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
		box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
		border-radius: 35rpx;
		padding: 0;
		color: rgba(#fff, 0.9);
	}
}
</style>
